//
//  SQLiteTable.h
//  etionMisc
//
//  Created by wjxfhxy on 5/10/13.
//  Copyright (c) 2013 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "DBColPropertyPair.h"


@protocol XMSTableColumnMapDelegate <NSObject>

@optional

- (XMSQueueDictionary *)tableClassValue:(NSArray *)arCol;

+ (BOOL)verifyTableName:(NSString*)tableName;

+ (XMSQueueDictionary *)tableColumnProperty:(NSArray *)arCol;

@end

@interface XMSSQLiteDBTable : NSObject

+ (void)registerDBTable:(NSString *)szDBTable asDBTable:(NSString *)szAsdbTable;

+ (NSArray *)getDBTablesAsDBTables:(NSArray *)arAstable;

+ (void)registerDBTable:(NSString *)szTable Cls:(Class)cls DBColPropertyPair:(XMSQueueDictionary *)qdPair;

+ (XMSQueueDictionary*)registerTableClass:(Class)cls cloumnPropertyPair:(XMSQueueDictionary *)qdPair;

/**
 *  for insert,update,delete,replace
 *
 *  @param szTable ""
 *  @param cls     ""
 *  @param arCol   ""
 *
 *  @return ""
 */
+ (XMSQueueDictionary *)getDBTableClsValue:(NSString *)szTable cls:(id)cls DBCol:(NSArray *)arCol;

+ (XMSQueueDictionary *)tableColumnMap:(XMSQueueDictionary*)qdMap classObj:(NSObject*)clsObj valueWithColoumn:(NSArray *)arCol;

/**
 *  for select,row array to cls array
 *
 *  @param szTable ""
 *  @param arCol   ""
 *
 *  @return ""
 */
+ (XMSQueueDictionary *)getDBTableColPropertyPair:(NSString *)szTable DBCol:(NSArray *)arCol;

+ (XMSQueueDictionary *)tableColumnMap:(XMSQueueDictionary*)qdMap propertyWithColoumn:(NSArray *)arCol;

/**
 *  通过指定格式文件，初始化数据库表与对象映射关系
 *
 *  @param formatFilePath 文件路径
 */
+ (void)initDBTableColPropertyPairWithFormatFilePath:(NSString*)formatFilePath;

@end
